<?php $this->header(); ?>
<div class="wrap">
    <?php include 'Setting_nav.php'; ?>
    <div class="h_a">提示</div>
    <div class="mb10 prompt_text">
        <ol>
            <li>隐藏index.php需要您的空间开启了重写模块!</li>
            <li>目前URL仅提供系统内置选择,后期会开放自由的编辑模式。</li>
        </ol>
    </div>
    <div class="h_a">内容值</div>
    <form class="J_ajaxForm" action="<?php echo $func->url('Admin-Setting-updateUrlModel'); ?>" method="post">
        <div class="table_full">
            <table width="100%">
                <col class="th" />
                <col/>
                <tr class="empty_expand">
                    <th>隐藏index.php</th>
                    <td>
                        <select name="index" class="c_model_id">
                            <option value="0" <?php if ($index == 0) {
        echo 'selected="selected"';
    } ?>>显示</option>
                            <option value="1" <?php if ($index == 1) {
        echo 'selected="selected"';
    } ?>>隐藏</option>
                        </select>
                    </td>
                </tr>
                <tr class="empty_expand">
                    <th>URL模式</th>
                    <td>
                        <select name="urlModel" class="c_model_id">
                            <option value="1" <?php if ($urlModel == 1) {
        echo 'selected="selected"';
    } ?>>传统模式</option>
                            <option value="2" <?php if ($urlModel == 2) {
        echo 'selected="selected"';
    } ?>>横杠模式</option>
                            <option value="3" <?php if ($urlModel == 3) {
        echo 'selected="selected"';
    } ?>>目录模式</option>
                        </select>
                    </td>
                </tr>
                <tr class="empty_expand">
                    <th>URL模式说明</th>
                    <td class="urlModelExplain">

                    </td>
                </tr>
            </table>
        </div>
        <div class="btn_wrap">
            <div class="btn_wrap_pd">
                <button class="btn btn_submit J_ajax_submit_btn" type="submit">提交</button>
            </div>
        </div>
    </form>
</div>
<script>
    uetjs.setting = function() {
        $(function() {
            caseShowUrlTips($("select[name=urlModel] option:selected").val())
            $("select[name=urlModel]").change(function() {
                var modelNum = $(this).val();
                caseShowUrlTips(modelNum);
            })
        })


        function caseShowUrlTips(modelNum) {
            switch (modelNum) {
                case '1' :
                    $(".urlModelExplain").html("<p>传统模式就是URL将已G,M,A参数模式显示。</p><p>例如：/?g=Home&m=index&a=index</p>");
                    break;
                case '2' :
                    $(".urlModelExplain").html("<p>横杠模式就是URL各项参数以-链接</p><p>例如：/Home-index-index</p>");
                    break;
                case '3' :
                    $(".urlModelExplain").html("<p>目录模式就是URL各项参数以/链接</p><p>例如：/Home/index/index</p>");
                    break;
                default:
                    return false;
            }
        }
    }
</script>
<?php $this->footer(); ?>